﻿using Abp.Domain.Entities.Auditing;
using System;
using static Camc.Quality.StoreManagement.StoreEnum;

namespace Camc.Quality.StoreManagement.StoragePut
{
    public class StorePutContent: FullAuditedEntity<Guid>
    {
        #region 入库信息  
        /// <summary>
        /// 入库单号
        /// </summary>
        public string StorePutNo { get; set; }
        /// <summary>
        /// 仓库ID
        /// </summary>
        public Guid? StoreId { get; set; }
        /// <summary>
        /// 仓库名称
        /// </summary>
        public string StroeName { get; set; }
        /// <summary>
        /// 储位ID
        /// </summary>
        public string BinLocationId { get; set; }
        /// <summary>
        /// 储位
        /// </summary>
        public string BinLocation { get; set; }
        /// <summary>
        /// 物料细料ID
        /// </summary>
        public Guid MaterialsContentId { get; set; }
        /// <summary>
        /// 放行单号
        /// </summary>
        public string ReleaseOrder { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 物料入库状态 0待入库、1已入库
        /// </summary>
        public StoreState StoreStateContent { get; set; } = 0;
        /// <summary>
        /// 入库人Id
        /// </summary>
        public long? StorePutPeopleId { get; set; }
        /// <summary>
        /// 入库时间
        /// </summary>
        public DateTime StorePutTime { get; set; }
        /// <summary>
        /// 确认人Id
        /// </summary>
        public long? IdentifyingPeopleId { get; set; }
        /// <summary>
        /// 确认时间
        /// </summary>
        public DateTime? IdentifyingTime { get; set; }

        #endregion

        #region 合格证信息 
        /// <summary>
        /// 合格证号
        /// </summary>
        public string QualifiedNumber { get; set; }
        /// <summary>
        /// 合格证Id
        /// </summary>
        public string CertificateId { get; set; }
        /// <summary>
        /// 产品图号
        /// </summary>
        public string ProductDrawingNo { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public string ProductName { get; set; }
        /// <summary>
        /// 批次
        /// </summary>
        public string Batch { get; set; }
        /// <summary>
        /// 合格证号任务
        /// </summary>
        public string QualifiedTaskNumber { get; set; }
        /// <summary>
        /// 可用数量
        /// </summary>
        public int Quantity { get; set; }
        /// <summary>
        /// 可用产品编号(件号)
        /// </summary>
        public string ProductNumber { get; set; }
        /// <summary>
        /// 可用产品编号(展示用)
        /// </summary>
        public string ProductNumberShow { get; set; }
        /// <summary>
        /// 产品编号生成方式 0：自动带出，1：手动输入， 3：自动生成
        /// </summary>
        public ProductNumberTypes ProductNumberType { get; set; }
        /// <summary>
        /// 特殊记载
        /// </summary>
        public string SpecialRecords { get; set; }
        /// <summary>
        /// 金属材料牌号状态
        /// </summary>
        public string MaterialBrandStatus { get; set; }
        /// <summary>
        /// 炉(批)号
        /// </summary>
        public string HeatNumber { get; set; }
        /// <summary>
        /// 化(试)验号
        /// </summary>
        public string Mthd { get; set; }
        /// <summary>
        /// 非金属材料牌号
        /// </summary>
        public string NonmetallicMaterialsBrand { get; set; }
        /// <summary>
        /// 批次号
        /// </summary>
        public string BatchNo { get; set; }
        /// <summary>
        /// 压制日期
        /// </summary>
        public string SuppressionDate { get; set; }
        /// <summary>
        /// 处理技术问题文件编号(技术文件号)
        /// </summary>
        public string DocumentNo { get; set; }
        /// <summary>
        /// 制造车间
        /// </summary>
        public string ManufacturingWorkshop { get; set; }
        /// <summary>
        /// 生产工人
        /// </summary>
        public string ProductionWorkers { get; set; }
        /// <summary>
        /// 工(组)长
        /// </summary>
        public string Foreman { get; set; }
        /// <summary>
        /// 检验员
        /// </summary>
        public string Inspector { get; set; }
        /// <summary>
        /// 日期
        /// </summary>
        public string Date { get; set; }
        /// <summary>
        /// 质控卡号
        /// </summary>
        public string QCCardNo { get; set; }
        /// <summary>
        /// 装配任务号
        /// </summary>
        public string AssemblyTaskNumber { get; set; }
        /// <summary>
        /// 阶段标记
        /// </summary>
        public string StageMark { get; set; }
        /// <summary>
        /// 材料牌号
        /// </summary>
        public string MaterialGrade { get; set; }
        /// <summary>
        /// 材料状态
        /// </summary>
        public string MaterialStatus { get; set; }
        ///// <summary>
        ///// 材料规格
        ///// </summary>
        //public string MaterialSpecification { get; set; }

        ///// <summary>
        ///// 标准件规格
        ///// </summary>
        //public string StandardSpecification { get; set; }
        /// <summary>
        /// 技术条件
        /// </summary>
        public string TechnicalConditions { get; set; }
        /// <summary>
        /// 材料合格证
        /// </summary>
        public string MaterialCertificate { get; set; }
        /// <summary>
        /// 协作合格证
        /// </summary>
        public string CooperationCertificate { get; set; }
        /// <summary>
        /// 供应单位
        /// </summary>
        public string SupplyCompany { get; set; }
        /// <summary>
        /// 非金属制造日期
        /// </summary>
        public DateTime? NonMetallicManufacturingDate { get; set; }
        /// <summary>
        /// 非金属压制日期
        /// </summary>
        public DateTime? NonMetallicPressingDate { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int Amount { get; set; }
        /// <summary>
        /// 所有产品编码
        /// </summary>
        public string JianNum { get; set; }
        /// <summary>
        /// 接收车间
        /// </summary>
        public string InceptWorkshop { get; set; }

        #endregion

        #region 基础信息 
        /// <summary>
        /// 型号(产品代号)
        /// </summary>
        public string ProductCode { get; set; }
        /// <summary>
        /// 型号(产品代号)Id
        /// </summary>
        public string ProductCodeId { get; set; }
        /// <summary>
        /// 发次
        /// </summary>
        public string SendTime { get; set; }
        /// <summary>
        /// 发次Id
        /// </summary>
        public string SendTimeId { get; set; }
        /// <summary>
        /// 规格
        /// </summary>
        public string Module { get; set; }
        /// <summary>
        /// 有效期止
        /// </summary>
        public string ExpirationDate { get; set; }
        /// <summary>
        /// 单位Id
        /// </summary>
        public Guid UnitId { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        ///转批次
        /// </summary>
        public string TurnBatch { get; set; }
        /// <summary>
        /// 物料属性
        /// </summary>
        public MaterialsPropertys MaterialsProperty { get; set; }
        ///// <summary>
        ///// 入库状态
        ///// </summary>
        //public InputStates InputState { get; set; }
        /// <summary>
        /// 入库方式
        /// </summary>
        public WarehousMethods WarehousMethod { get; set; }
        /// <summary>
        /// 隔离单号
        /// </summary>
        public string IsolationCode { get; set; }
        /// <summary>
        /// 隔离原因
        /// </summary>

        public string IsolationReason { get; set; }
        /// <summary>
        /// 隔离人员Id
        /// </summary>

        public long? IsolationUserId { get; set; }
        /// <summary>
        /// 隔离人员
        /// </summary>

        public string IsolationUser { get; set; }
        /// <summary>
        /// 隔离时间
        /// </summary>
        public DateTime? IsolationTime { get; set; }
        #endregion
        /// <summary>
        /// 扫码解密数据
        /// </summary>
        public string AesEncryptData { get; set; }
        /// <summary>
        /// 质量接口入库时型号发次
        /// </summary>
        public string ProductModel { get; set; }

        public enum ProductNumberTypes
        {
            自动带出 = 0,
            手动输入 = 1,
            自动生成 = 2
        }
      
        //public enum InputStates
        //{
        //    待入库 = 0,
        //    已入库 = 1
        //}
        public enum WarehousMethods
        {
            合格证入库 = 0,
            放行单入库 = 1,
            手动合格证入库 = 2
        }

    }
}
